package top.lyc829.zzl_android.ui.message.replay;

import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.module.DraggableModule;
import com.chad.library.adapter.base.module.LoadMoreModule;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;

import org.jetbrains.annotations.NotNull;

import top.lyc829.zzl_android.R;
import top.lyc829.zzl_android.logic.bean.NoticeCommentBean;

/**
 * @Author lyc
 * @create 2021-04-06 14:43
 */
public class ReplayAdapter extends BaseQuickAdapter<NoticeCommentBean, BaseViewHolder> implements DraggableModule {

    public ReplayAdapter() {
        super(R.layout.notice_comment_item);
    }

    @Override
    protected void convert(@NotNull BaseViewHolder baseViewHolder, NoticeCommentBean noticeCommentBean) {
        baseViewHolder.setText(R.id.notice_comment_item_user_name, noticeCommentBean.getNickname());
        baseViewHolder.setText(R.id.notice_comment_item_content, "回复了你: " + noticeCommentBean.getText());
        Glide.with(getContext())
                .load(noticeCommentBean.getUserAvatar())
                .into((ImageView) baseViewHolder.getView(R.id.notice_comment_item_avatar));
    }
}
